<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>counting_range</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../ranges.html" title="Provided Ranges">
<link rel="prev" href="../ranges.html" title="Provided Ranges">
<link rel="next" href="istream_range.html" title="istream_range">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="counting_range">
<div class="titlepage"><div><div><h4 class="title">
<a name="range.reference.ranges.counting_range"></a><a class="link" href="counting_range.html" title="counting_range"> counting_range</a>
</h4></div></div></div>
<a name="range.reference.ranges.counting_range.prototype"></a><h6>
<a name="id658363"></a>
          <a class="link" href="counting_range.html#range.reference.ranges.counting_range.prototype">Prototype</a>
        </h6>
<p>

</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Incrementable</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="identifier">Incrementable</span><span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">Incrementable</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Incrementable</span> <span class="identifier">last</span><span class="special">);</span>

<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
<span class="identifier">counting_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>

<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
</pre>
<p>
        </p>
<a name="range.reference.ranges.counting_range.description"></a><h6>
<a name="id658736"></a>
          <a class="link" href="counting_range.html#range.reference.ranges.counting_range.description">Description</a>
        </h6>
<p>
          <code class="computeroutput"><span class="identifier">counting_range</span></code> is a function
          to generator that generates an <code class="computeroutput"><span class="identifier">iterator_range</span></code>
          wrapping a <code class="computeroutput"><span class="identifier">counting_iterator</span></code>
          (from Boost.Iterator).
        </p>
<a name="range.reference.ranges.counting_range.definition"></a><h6>
<a name="id658794"></a>
          <a class="link" href="counting_range.html#range.reference.ranges.counting_range.definition">Definition</a>
        </h6>
<p>
          Defined in header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">counting_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
        </p>
<a name="range.reference.ranges.counting_range.requirements"></a><h6>
<a name="id658856"></a>
          <a class="link" href="counting_range.html#range.reference.ranges.counting_range.requirements">Requirements</a>
        </h6>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<code class="computeroutput"><span class="identifier">Incrementable</span></code> is a model
            of the <code class="computeroutput"><span class="identifier">Incrementable</span></code>
            Concept.
          </li></ol></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
